home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 42 / Amiga Format AFCD42 (Issue 126, Aug 1999).iso / -serious- / programming / amos / amoslist-0499 / amoslist / 000076_nobody_Fri Apr 9 09:04:13 1999.msg < prev    next >
Internet Message Format  |  1999-05-17  |  3KB

  1. Received: from onelist.com (pop.onelist.com [209.207.135.253])
  2.     by osf1.gmu.edu (8.8.8/8.8.8) with SMTP id JAA10954
  3.     for <mcox4@osf1.gmu.edu>; Fri, 9 Apr 1999 09:04:12 -0400 (EDT)
  4. Received: (qmail 18221 invoked by alias); 9 Apr 1999 12:52:13 -0000
  5. Received: (qmail 18205 invoked from network); 9 Apr 1999 12:52:13 -0000
  6. Received: from unknown (HELO cicero1.cybercity.dk) (212.242.40.4) by pop.onelist.com with SMTP; 9 Apr 1999 12:52:13 -0000
  7. Received: from usr00.cybercity.dk (usr00.cybercity.dk [212.242.40.34]) by cicero1.cybercity.dk (8.8.8/8.8.7) with ESMTP id OAA08460 for <amos-list@onelist.com>; Fri, 9 Apr 1999 14:55:05 +0200 (CEST) (envelope-from keller@vip.cybercity.dk)
  8. Received: from vip.cybercity.dk (ccc21504@msx-arh-19-1.ppp.cybercity.dk [212.242.21.129]) by usr00.cybercity.dk (8.8.8/8.8.8) with SMTP id OAA29732 for <amos-list@onelist.com>; Fri, 9 Apr 1999 14:55:02 +0200 (CEST) (envelope-from keller@vip.cybercity.dk)
  9. From: Rune Keller <keller@vip.cybercity.dk>
  10. To: amos-list@onelist.com
  11. Date: Fri, 09 Apr 1999 14:49:01 +0100
  12. Message-ID: <yam7768.99.140122512@vip.cybercity.dk>
  13. In-Reply-To: <yam7768.633.3126464@mail.netspace.net.au>
  14. X-Mailer: YAM 2.0Preview6 [020] - Amiga Mailer by Marcel Beck - http://www.yam.ch
  15. Mailing-List: list amos-list@onelist.com; contact amos-list-owner@onelist.com
  16. Delivered-To: mailing list amos-list@onelist.com
  17. Precedence: bulk
  18. List-Unsubscribe: <mailto:amos-list-unsubscribe@ONElist.com>
  19. Reply-to: amos-list@onelist.com
  20. Mime-Version: 1.0
  21. Content-Type: text/plain
  22. Subject: [amos-list] Re: Icons & Buffering
  23. Status: O
  24. X-Status: 
  25.  
  26. From: Rune Keller <keller@vip.cybercity.dk>
  27.  
  28. On 09-Apr-99, Leto Kauler wrote:
  29.  
  30. > I'm having some (well, a fair bit) of trouble with icon pasting on
  31. > double buffered screens.
  32.  
  33. > I've attempted to use Turbo's "F 16 Icon" but this only seems to
  34. > paste to one plane too!  Can anyone help???
  35.  
  36. You can have an UPDATE variable that tells which icons you have changed, and
  37. then have it drawn twice (one for each screen). Something like this:
  38.  
  39. Dim _UPDATE(15,15)
  40. Dim _MAP(15,15)
  41.  
  42. Double Buffer
  43. Autoback 0
  44. Bob Update Off
  45.  
  46. Do
  47.  
  48. 'Add Powerup
  49. If Rnd(100)<5
  50.    X=Rnd(15)
  51.    Y=Rnd(15)
  52.    _MAP(X,Y)=10
  53.  
  54.    'This tells the draw routine to draw this icon twice
  55.    _UPDATE(X,Y)=2
  56. End If
  57.  
  58. 'Draw icons
  59. For Y=0 To 15
  60.    For X=0 To 15
  61.       If _UPDATE(X,Y)>0
  62.          Dec _UPDATE(X,Y)
  63.          Paste Icon X,Y,_MAP(X,Y) 
  64.       End If
  65.    Next
  66. Next
  67.  
  68. Bob Draw
  69. Screen Swap
  70. Wait Vbl
  71. Bob Clear
  72.  
  73. Loop
  74.  
  75. -- 
  76. rune j. keller - sporuplundsvej 105 - dk-8472 sporup - keller@vip.cybercity.dk
  77.           - it's too bad she won't live... but then again, who does?
  78.  
  79.  
  80.  
  81. ------------------------------------------------------------------------
  82. Share the wealth!
  83. http://www.ONElist.com
  84. Tell a friend about ONElist's 115,000 free e-mail communities!
  85. ------------------------------------------------------------------------
  86. Official AMOS WWW: http://members.xoom.com/AmosFactory/front.html